package com.qn.common.base.model;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
/**
 * qingniu-cloud user source analysis
 *
 * @Author: TXG
 * @Date: 2024/6/11
 * @Version V0.0.2
 */
@Tag(name= "返回基类",description = "返回基类")
public class ResponseMode implements Serializable {

    public ResponseMode() {
        timestamp = new Date();
    }

    
    public ResponseMode(Integer code, String msg) {
        setCode(code);
        setMessage(msg);
        timestamp = new Date();
    }

    /***
     * 错误代码 200成功 其他失败
     */
    @Schema(description = "响应代码")
    public Integer code;
    /***
     * 服务端响应消息
     */
    @Schema(description = "消息")
    public String message;

    @Schema(description = "响应时间")
    private Date timestamp;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }
}
